class CreateMultimedias < ActiveRecord::Migration
  def self.up
    create_table :multimedias do |t|      
        t.string :type
        t.string :name
        t.string :data_file_name
        t.string :data_content_type
        t.integer :data_file_size    
        t.string :data_remote_url
        t.integer :user_id, :limit => 20, :null => false        
        t.integer :core_id, :limit => 20
        t.integer :readings, :limit => 5, :default => 0
        t.integer :vote, :limit => 5, :default => 0
        t.integer :album_id, :limit => 20
        t.string :category, :limit => 40
        t.timestamps
    end
  end

  def self.down
    drop_table :multimedias
  end
end
